<template>
  <div>
    投资名称:<input type="text"  />
    投资总额度:<input type="text"/>-<input type="text" />
    <input type="button" value="查询" @click="show">
<table>
  <tr>
    <td>投资名称</td>
    <td>投资总额度</td>
    <td>已投资额度</td>
    <td>剩余额度</td>
    <td>投资人数</td>
    <td>操作</td>
  </tr>
  <tr v-for="item in list" :key="item.ID">
    <td>{{ item.I_Name }}</td>
    <td>{{ item.I_Total }}</td>
    <td>{{ item.I_Addmoney }}</td>
    <td>{{ item.I_Sellmoney }}</td>
    <td>{{ item.I_Peo }}</td>
    <td><input type="button" value="删除"><input type="button" value="修改"></td>
  </tr>
</table>
  </div>
</template>

<script setup lang="ts">
import { reactive, toRefs ,onMounted} from 'vue';
import { useRouter } from 'vue-router';
import axios from 'axios';

const router=useRouter();

onMounted(()=>{
  show();
})

let data:any=reactive({
  list:[],
  
})

const { list } = toRefs(data);

const show=()=>{
axios({
  url:"http://localhost:56975/api/Invest/GetShowInvest",
  method:'get',
  params:{
    
  }
}).then(res=>{
console.log(res);
list.value=res.data

}).catch(err=>{
console.log(err);

})
}


</script>

<style scoped>

</style>